package weather.gui.panels;

import javax.swing.JFrame;
import javax.swing.JSplitPane;
import javax.swing.WindowConstants;

@SuppressWarnings("serial")
public class SplitMainPanel extends javax.swing.JSplitPane {

	private QuestionPanel questionPanel;
	private ChatPanel chatPanel;


	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new SplitMainPanel());
		frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public SplitMainPanel() {
		super();
		initGUI();
		questionPanel.setChatPanel(chatPanel);
	}
	
	private void initGUI() {
		try { 
			{
				this.setOrientation(JSplitPane.VERTICAL_SPLIT);
				questionPanel = new QuestionPanel();
				this.setBottomComponent(questionPanel);
				chatPanel = new ChatPanel();
				this.setTopComponent(chatPanel);
				this.setContinuousLayout(true);
				this.setOneTouchExpandable(true);
				this.setResizeWeight(0.5);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
